package com.lcy.web.model.sql.base.mine;

/**
 * Created by loucunyin on 2016/12/7 0007.
 * 选择条件
 */
public class SelectCondition {
    private String mColumn;
    private String mOperator = "=";
    private Object mValue;
    private String mLogic = "and";

    public SelectCondition(String column, Object value) {
        mColumn = column;
        mValue = value;
    }

    public SelectCondition(String column, Object value, String operator) {
        mColumn = column;
        mOperator = operator;
        mValue = value;
    }

    public SelectCondition(String column, Object value, String operator, String logic) {
        mColumn = column;
        mOperator = operator;
        mValue = value;
        mLogic = logic;
    }

    public String getColumn() {
        return mColumn;
    }

    public void setColumn(String column) {
        mColumn = column;
    }

    public String getOperator() {
        return mOperator;
    }

    public void setOperator(String operator) {
        mOperator = operator;
    }

    public Object getValue() {
        return mValue;
    }

    public void setValue(String value) {
        mValue = value;
    }

    public String getLogic() {
        return mLogic;
    }

    public void setLogic(String logic) {
        mLogic = logic;
    }

    public boolean isValid(){
        if(mColumn == null || mColumn.isEmpty()){
            return false;
        }

        return true;
    }
}
